<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/WEB-INF/views/wx/include/head.jsp" %>
</head>
<body>
	<header class="mui-bar mui-bar-nav">
		<a href="${ctxWx}/pu/my" class="mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">常用信息</h1>
	</header>
	<div class="mui-content">
		<form id="inputForm" action="${ctxWx}/pu/rcpt/save" method=post>
			<input type="hidden" name="alwaysid" value="${tUsersRcpt.alwaysid }"/>
			<input type="hidden" name="userid" value="${tUsersRcpt.userid }"/>
			<input type="hidden" name="rcptIds" value="${rcptIds }"/>
			<div class="mui-input-group">
				<div class="mui-input-row">
					<label class="control-label" for="title">发票类型</label>
					<input type="text" value="增值税普通发票" readonly="readonly"/>
				</div>
				<div class="mui-input-row">
					<label class="control-label" for="title">发票抬头<span class="required-red">*</span></label>
					<input id="title" name="title" type="text" placeholder="为保证您的权益,请准确填写" value="${tUsersRcpt.title }"/>
				</div>
				<div class="mui-input-row">
					<label class="control-label" for="receiver">收件人<span class="required-red">*</span></label>
					<input id="receiver" name="receiver" type="text" placeholder="请输入收件人名称" value="${tUsersRcpt.receiver }"/>
				</div>
				<div class="mui-input-row">
					<label class="control-label" for="receiver">手机号<span class="required-red">*</span></label>
					<input id="mobile" name="mobile" type="text" placeholder="请输入手机号" value="${tUsersRcpt.mobile }"/>
				</div>
				<div class="mui-input-row">
					<label class="control-label" for="address">收件地址<span class="required-red">*</span></label>
					<input id="address" name="address" type="text" placeholder="请输入收件地址" value="${tUsersRcpt.address }"/>
				</div>
				<div class="mui-input-row">
					<label class="control-label" for="address">邮编<span class="required-red">*</span></label>
					<input id="postcode" name="postcode" type="text" placeholder="请输入邮编" value="${tUsersRcpt.postcode }"/>
				</div>
			</div>
			<div class="mui-content-padded">
				<button type="button" class="mui-btn mui-btn-primary mui-btn-block" onclick="check();">保存</button>
			</div>
		</form>
		<div class="mui-content-padded">
			<p>开票规则：</p>
			<p>1、开票内容仅支持代办租车费，发票类型仅支持增值税普通发票。<br/>
			2、您可按订单申请开票，可开票金额为订单实际支付金额。<br/>
			3、单次申请开票合计满1000元包邮，不满1000元邮费到付。暂不支持港澳台地区包邮。<br/>
			4、开具发票需提供：发票抬头、收件人及电话、邮寄地址、邮编。<br/>
			5、增值税普通发票我们将在3-7个工作日寄出。<br/>
			6、因个人原因导致发票退回重开，所产生的往返快递费用由您自行承担。</p>
		</div>
	</div>
	<%@ include file="/WEB-INF/views/wx/include/script.jsp"%>
	<script type="text/javascript">
	function check(){
		var title = $('#title');
		var receiver = $('#receiver');
		var address = $('#address');
		var postcode = $('#postcode');
		var r = /^1[3|4|5|7|8]\d{9}$/;
		var r2 = /^[1-9][0-9]{5}$/;
		var mobile = $('#mobile');
		if($.trim(mobile.val()) == ''){
			mui.alert('请填写手机号');
			return;
		} else if(!r.test(mobile.val())){
			mui.alert('手机号不正确');
			return;
		}
		if($.trim(postcode.val()) == ''){
			mui.alert('请填写邮编');
			return;
		} else if(!r2.test(postcode.val())){
			mui.alert('邮编不正确');
			return;
		}
		if($.trim(title.val())==''){
			mui.alert('请填写发票抬头！');
			return;
		}
		if($.trim(receiver.val())==''){
			mui.alert('收件人不能为空！');
			return;
		}
		if($.trim(address.val())==''){
			mui.alert('地址不能为空！');
			return;
		}
		$('#inputForm').submit();
	}
	</script>
</body>
</html>